#include "CEGuiSample.h"
#include "CEGUI.h"
#include "AnimationWindowTrans.h"
#include "DaterBaseWindowManager.h"

#include<string>

AlphaTransWindow::AlphaTransWindow(CEGUI::Window* affectedWindow,std::string an_name)
		:_affectedWindow(affectedWindow)
{
	_animation = CEGUI::AnimationManager::getSingleton().getAnimation(an_name);
	_animationInstance = CEGUI::AnimationManager::getSingleton().instantiateAnimation(_animation);
	_animationInstance->setTargetWindow(_affectedWindow);
	_animationInstance->setSpeed(2);
};

void AlphaTransWindow::start()
{
	_animationInstance->start();
}



RotateTransWindow::RotateTransWindow(CEGUI::Window* affectedWindow,std::string an_name)
		:_affectedWindow(affectedWindow)
{
	_animation = CEGUI::AnimationManager::getSingleton().getAnimation(an_name);
	_animationInstance = CEGUI::AnimationManager::getSingleton().instantiateAnimation(_animation);
	_animationInstance->setTargetWindow(_affectedWindow);
	_animationInstance->setSpeed(2);
};

void RotateTransWindow::start()
{
	_animationInstance->start();
}


MoveTransWindow::MoveTransWindow(CEGUI::Window* affectedWindow,std::string an_name)
		:_affectedWindow(affectedWindow)
{
	_animation = CEGUI::AnimationManager::getSingleton().getAnimation(an_name);
	_animationInstance = CEGUI::AnimationManager::getSingleton().instantiateAnimation(_animation);
	_animationInstance->setTargetWindow(_affectedWindow);
	_animationInstance->setSpeed(2);
};

void MoveTransWindow::start()
{
	_animationInstance->start();
}